package collections;
import java.util.*;
class Snow{}
class Power extends Snow{}
class Light extends Power{}
class Heavy extends Power{}
class Custy extends Snow{}
class Slush extends Snow{}
public class AsListInference {
    public static void main(String[] args){
        List <Snow> snow1 = Arrays.asList(new Custy(),new Slush(),new Power());

        List <Snow> snow2 = Arrays.asList(new Light(),new Heavy());
        List<Snow> snow3 = new ArrayList<>();
        Collections.addAll(snow3,new Light(),new Power());
        snow3.add(new Custy());
//        显式类型参数说明
        List<Snow> snow4 = Arrays.<Snow>asList(new Light(),new Heavy(),new Slush());


    }
}
